#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define int long long
#define fi first
#define se second
using namespace std;
const int N = 5e6+5;
int n,m;
int va[N];
signed main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    IOS;
    cin>>n;
    for(int i=1;i<=n;i++) cin>>va[i];
    sort(va+1,va+1+n);
    int l = 1,r = 2;
    int go = 0;
    while(1)
    {
        if(va[l]<va[r])
        {
            go++;
            l++;
            r++;
        }
        else r++;

        if(r==n+1) break;
    }
    cout<<n-go;
}
